Skip to content

Conversation

johnsimons
Copy link
Member

@johnsimons johnsimons commented Aug 22, 2025

This PR improves the rendering of the instructions so that it supports an empty list of instructions, which is added in Particular/ServiceControl#5104.

So for ASQ, we were displaying:
image

and now we display:
image

For MSMQ we were displaying:
image

and now we display:
image

For broker transports such as ASB we were displaying:
image

and now we display:
image

Note

This PR is not 100% backwards compatible, so if the user upgrades SC to latest and does not upgrade SP, they will see:
image
which is not too bad.

<template>
<div class="row">
<p v-if="(settingsInfo?.broker_settings.length ?? 0 > 0) || (!isBrokerTransport && useIsMonitoringEnabled())">
<p v-if="(settingsInfo?.broker_settings.length ?? 0 > 0) || ((settingsInfo?.monitoring_settings.length ?? 0 > 0) && useIsMonitoringEnabled()) || (settingsInfo?.service_control_settings.length ?? 0 > 0)">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is a bit hard for me to parse (especially with the .monitoring_settings and .service_control_settings differences which looks very similar to the rest to the code).

Is it possible to put this behind a named function to make it more readable?

v-if="shouldDisplayCollectionInstructions() or something like that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have refactor this, thanks for pointing it out

@johnsimons johnsimons marked this pull request as ready for review August 26, 2025 23:51
This improves the rendering of the instructions so that it support empty list of instructions.
@johnsimons johnsimons force-pushed the john/better-instructions branch from c7c3d0f to 99f41e2 Compare August 27, 2025 01:07
@johnsimons johnsimons enabled auto-merge August 27, 2025 01:08
@johnsimons johnsimons added the Type: Improvement Type: Improvement label Aug 27, 2025
@johnsimons johnsimons added this to the 2.3.0 milestone Aug 27, 2025
@johnsimons johnsimons merged commit 2844894 into master Aug 27, 2025
5 checks passed
@johnsimons johnsimons deleted the john/better-instructions branch August 27, 2025 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement Type: Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants